﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using HousingInfo.Library;
using System.IO;

namespace WebHousingInfo.Controls
{
    public partial class QuangCaoTren : System.Web.UI.UserControl
    {
        LocationAdvertisementBO LocalBO;
        LocationAdvertisementDetailBOList LocalDeTailBOList;
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        public LocationAdvertisementDetailBOList GetLocal()
        {
            try
            {
                LocalBO = LocationAdvertisementBO.GetLocationAdvertisementBO(1);
                if (LocalBO.IsActive == true)
                {
                    LocalDeTailBOList = LocalBO.LocationAdvertisementDetailBOList;
                    return LocalDeTailBOList;
                }
                else return null;
            }
            catch
            {
                return null;
            }
        }

        public bool checkurlimage(string imagestring)
        {
            var pathFileImage = Server.MapPath("TotalUpload/ImagesTotal/" + imagestring);
            if (File.Exists(pathFileImage))
            {
                return true;
            }
            else return false;
        }
    }
}